package com.gj.baselib.sysutils;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.widget.TextView;

import com.gj.baselib.R;
import com.lidroid.xutils.ViewUtils;
import com.lidroid.xutils.view.annotation.ViewInject;

public class SysUtilsActivity extends Activity {

	@ViewInject(R.id.txt_appversion)
	private TextView txt_appversion;
	
	@ViewInject(R.id.txt_diskcachedir)
	private TextView txt_diskcachedir;

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_sysutils);

		ViewUtils.inject(this);

		StringBuffer sb = new StringBuffer();
		
		sb.append("磁盘缓存目录："+AndroidSysUtils.getDiskCacheDirName(this)+"\r\n");
		sb.append("手机型号："+AndroidSysUtils.getModel()+"\r\n");
		sb.append("SDK版本号："+AndroidSysUtils.getSdk()+"\r\n");
		sb.append("Release版本号："+AndroidSysUtils.getRelease()+"\r\n");
		sb.append("Imei号："+AndroidSysUtils.getImei(this)+"\r\n");
		sb.append("手机号："+AndroidSysUtils.getPhoneNumber(this)+"\r\n");
		sb.append("IMSI号："+AndroidSysUtils.getImsi(this)+"\r\n");
		sb.append("运营商："+AndroidSysUtils.getSimOperatorName(this)+"\r\n");
		
		txt_diskcachedir.setText(sb.toString());
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

	@Override
	protected void onDestroy() {
		// TODO Auto-generated method stub
		super.onDestroy();
	}
}
